package com.jxc.model.po;

/***********************************************************************
 * Module:  Transferlist.java
 * Author:  Administrator
 * Purpose: Defines the Class Transferlist
 ***********************************************************************/

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 调拨单
 * 
 * @pdOid 070df0f1-62a6-490d-bcd2-c6e3ef856a96
 */
@Entity
@Table(name = "KCGL_TRANSFERLIST")
public class Transferlist extends IdEntity implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 4590082840106732843L;
	/**
	 * 日期
	 * 
	 * @pdOid 7197f720-47f0-4e68-a4c5-6da02fb19d84
	 */
	private Date date;
	/**
	 * 单号
	 * 
	 * @pdOid f2686ef9-da57-4dff-87dc-c246ea49e9fa
	 */
	private String serial;
	/**
	 * 操作员
	 * 
	 * @pdOid 7fb160d6-0e39-4371-9846-3ac3bd9dd965
	 */
	private User user;
	/**
	 * 调出仓库
	 * 
	 * @pdOid bcc1231f-ae5f-4dd4-a0dc-2ab9070236c6
	 */
	private Repertory outRepertory;
	/**
	 * 调入仓库
	 * 
	 * @pdOid 33d9728c-779a-4a2d-b02b-3124012aa157
	 */
	private Repertory inRepertory;
	/**
	 * 调拨总数
	 * 
	 * @pdOid fb772e17-19ab-4f46-b7b4-f9460fc43140
	 */
	private Integer num;
	/**
	 * 是否确认
	 * 
	 */
	private Boolean isOutConfirm;
	/**
	 * 确认时间
	 * 
	 */
	private Date outConfirmDate;
	/**
	 * 确认人
	 * 
	 */
	private User outConfirmUser;
	/**
	 * 是否确认
	 * 
	 */
	private Boolean isInConfirm;
	/**
	 * 确认时间
	 * 
	 */
	private Date inConfirmDate;
	/**
	 * 确认人
	 * 
	 */
	private User inConfirmUser;
	/**
	 * 备注
	 * 
	 * @pdOid a53768e8-8eeb-41c1-b8b1-ab405803d646
	 */
	private String remark;

	private List<TransferlistItem> items = new ArrayList<TransferlistItem>();

	public Transferlist() {
		super();
	}

	public Transferlist(Long id) {
		super(id);
	}

	@Column(name = "IS_OUT_CONFIRM")
	public Boolean getIsOutConfirm() {
		return isOutConfirm;
	}

	public void setIsOutConfirm(Boolean isOutConfirm) {
		this.isOutConfirm = isOutConfirm;
	}

	@Column(name = "OUT_CONFIRM_DATE")
	public Date getOutConfirmDate() {
		return outConfirmDate;
	}

	public void setOutConfirmDate(Date outConfirmDate) {
		this.outConfirmDate = outConfirmDate;
	}

	@ManyToOne
	@JoinColumn(name = "OUT_CONFIRM_USER_ID")
	public User getOutConfirmUser() {
		return outConfirmUser;
	}

	public void setOutConfirmUser(User outConfirmUser) {
		this.outConfirmUser = outConfirmUser;
	}

	@Column(name = "IS_IN_CONFIRM")
	public Boolean getIsInConfirm() {
		return isInConfirm;
	}

	public void setIsInConfirm(Boolean isInConfirm) {
		this.isInConfirm = isInConfirm;
	}

	@Column(name = "IN_CONFIRM_DATE")
	public Date getInConfirmDate() {
		return inConfirmDate;
	}

	public void setInConfirmDate(Date inConfirmDate) {
		this.inConfirmDate = inConfirmDate;
	}

	@ManyToOne
	@JoinColumn(name = "IN_CONFIRM_USER_ID")
	public User getInConfirmUser() {
		return inConfirmUser;
	}

	public void setInConfirmUser(User inConfirmUser) {
		this.inConfirmUser = inConfirmUser;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "DATE")
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	@Column(name = "SERIAL")
	public String getSerial() {
		return serial;
	}

	public void setSerial(String serial) {
		this.serial = serial;
	}

	@ManyToOne
	@JoinColumn(name = "USER_ID")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@ManyToOne
	@JoinColumn(name = "OUT_REPERTORY_ID")
	public Repertory getOutRepertory() {
		return outRepertory;
	}

	public void setOutRepertory(Repertory outRepertory) {
		this.outRepertory = outRepertory;
	}

	@ManyToOne
	@JoinColumn(name = "IN_REPERTORY_ID")
	public Repertory getInRepertory() {
		return inRepertory;
	}

	public void setInRepertory(Repertory inRepertory) {
		this.inRepertory = inRepertory;
	}

	@Column(name = "NUM", length = 10)
	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@OneToMany(cascade = CascadeType.REMOVE, fetch = FetchType.LAZY, mappedBy = "transferlist", orphanRemoval = true)
	public List<TransferlistItem> getItems() {
		return items;
	}

	public void setItems(List<TransferlistItem> items) {
		this.items = items;
	}

}